import request from '@/utils/request'

// 用你预算申报

// 列表 错误码309101
export function list(params) {
    return request({
        url: '/energy/budget-summary/summaryList',
        method: 'get',
        params
    })
}

// 详情 错误码309102
export function detail(id) {
    return request({
        url: `/energy/budget-summary/${id}`,
        method: 'get',
    })
}

// 新增 错误码309103
export function add(data) {
    return request({
        url: `/energy/budget-summary`,
        method: "post",
        data
    });
}

// 修改 错误码309104
export function edit(data) {
    return request({
        url: `/energy/budget-summary`,
        method: "put",
        data
    });
}

// 汇总 错误码309105
export function summary(data) {
    return request({
        url: `/energy/budget-summary/summary`,
        method: "post",
        data
    });
}

// 删除 错误码309106
export function deleteSummaryList(id) {
    return request({
        url: `/energy/budget-summary/${id}`,
        method: "delete",
    });
}

// 审批记录 错误码309107
export function getLog(id) {
    return request({
        url: `/energy/budget-summary/${id}/auditLogs`,
        method: "get",
    });
}

// 审批 错误码309108
export function auditSummary(data) {
    return request({
        url: `/energy/budget-summary/audit`,
        method: "put",
        data
    });
}

// 获取模板 错误码309110
export function detailDynamicTitleTemplate(id) {
    return request({
        url: `/energy/budget-summary/detailDynamicTitleTemplate/${id}`,
        method: "get",

    });
}
